Count Property

Task Parallel System.Threading

Gets the number of elements contained in the ConcurrentStack<(Of <(T>)>).

Namespace:  System.Collections.Concurrent
Assembly:  System.Threading (in System.Threading.dll)

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Count As Integer
C#
public int Count { get; }

Field Value

The number of elements contained in the ConcurrentStack<(Of <(T>)>).

Implements

ICollection..::.Count

Remarks

For determining whether the collection contains any items, use of the IsEmpty property is recommended rather than retrieving the number of items from the Count property and comparing it to 0.

See Also